updating oE atom_to_float64
atom_to_float64
include convert.e namespace convert public function atom_to_float64(atom a)
converts an atom to a sequence of 8 bytes in IEEE 64-bit format.
Parameters:
- a : the atom to convert:
Returns:
A sequence, of 8 bytes, which can be poked in memory to represent a.
Comments:
All Euphoria atoms have values which can be represented as 64-bit IEEE floating-point numbers, so you can convert any atom to 64-bit format without losing any precision.
Integer values will also be converted to 64-bit floating-point format.
Example 1:
fn = open("numbers.dat", "wb") puts(fn, atom_to_float64(157.82)) -- write 8 bytes to a file
See Also:
Not Categorized, Please Help
|